/****************************************************************************
** Form implementation generated from reading ui file 'SQLquery_form.ui'
**
** Created: czw sty 19 11:50:11 2006
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "SQLquery_form.h"

#include <qvariant.h>
#include <qdatatable.h>
#include <qbuttongroup.h>
#include <qpushbutton.h>
#include <qtextedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "../SQLquery_form.ui.h"
/*
 *  Constructs a Form4 as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
Form4::Form4( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "Form4" );

    dataTableQuery = new QDataTable( this, "dataTableQuery" );
    dataTableQuery->setGeometry( QRect( 10, 10, 581, 270 ) );

    buttonGroup50 = new QButtonGroup( this, "buttonGroup50" );
    buttonGroup50->setGeometry( QRect( 470, 290, 121, 180 ) );

    buttonQueryExecute = new QPushButton( buttonGroup50, "buttonQueryExecute" );
    buttonQueryExecute->setGeometry( QRect( 10, 30, 101, 41 ) );

    buttonRefresh = new QPushButton( buttonGroup50, "buttonRefresh" );
    buttonRefresh->setGeometry( QRect( 10, 80, 101, 41 ) );

    buttonZalacz = new QPushButton( buttonGroup50, "buttonZalacz" );
    buttonZalacz->setGeometry( QRect( 10, 130, 100, 40 ) );

    text_query = new QTextEdit( this, "text_query" );
    text_query->setGeometry( QRect( 11, 291, 450, 180 ) );
    languageChange();
    resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonQueryExecute, SIGNAL( clicked() ), dataTableQuery, SLOT( refresh() ) );
    connect( buttonQueryExecute, SIGNAL( clicked() ), this, SLOT( query() ) );
    connect( buttonRefresh, SIGNAL( clicked() ), dataTableQuery, SLOT( refresh() ) );
    connect( buttonZalacz, SIGNAL( clicked() ), this, SLOT( getSQLFileName() ) );
    connect( buttonRefresh, SIGNAL( clicked() ), text_query, SLOT( clear() ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
Form4::~Form4()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Widget polish.  Reimplemented to handle
 *  default data table initialization
 */
void Form4::polish()
{
    QDialog::polish();
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Form4::languageChange()
{
    setCaption( trUtf8( "\x51\x73\x70\xc3\xb3\x6c\x6e\x6f\x74\x61\x20\x2d\x20\x53\x51\x4c\x20\x71\x75\x65\x72\x79" ) );
    buttonGroup50->setTitle( tr( "Opcje" ) );
    buttonQueryExecute->setText( tr( "Wykonaj" ) );
    buttonRefresh->setText( tr( "Odswiez" ) );
    buttonZalacz->setText( trUtf8( "\x5a\x61\xc5\x82\x61\x63\x7a" ) );
}

